**Bearing witness: Introducing PMAD - JPR - accepted 2024 - Collin Meisel et al.

*import data
clear
cd [FILE PATH TO DOWNLOADED DATA]
import excel "Diplometrics_PMAD_version_3-1-1_Country-Year-Data_20230613.xlsx", sheet("Data") firstrow

*Summary stats and visualization
	*For map
	browse Country Atrocities_Scope_and_Scale_Heuri if Year==2022
	*map created in datawrapper

	*range plot
	gen ASSH2018 = Atrocities_Scope_and_Scale_Heuri if Year==2018
	bysort Country(Year): carryforward ASSH2018, replace
	gsort Country -Year
	by Country: gen en = _n
	gen ASSH2022 = Atrocities_Scope_and_Scale_Heuri if Year==2022
	bysort Country(en): carryforward ASSH2022, replace
	drop en
	sort Country Year
	egen ASSHavg = mean(Atrocities_Scope_and_Scale_Heuri),by(Country)
	browse Country ASSH*
	*plot created in datawrapper
	
	*other figures using Excel pivot tables & datawrapper
	
	*spider/radar plot
	spider Mass_Murder_Index Mass_Lesslethal_Violence_Index Mass_Displacement_Index ///
	Mass_Conscription_Index Mass_Containment_Index Mass_Erasure_Index Reduced_Citizenship_Index, ///
	over(Country_UN_Subregion) cuts(7) ralabsize(3) scheme(538) palette(okabe)

*Correlations & Regressions

use "Diplometrics_PMAD_version_3-1-1_Country-Year-Data_MergedforAnalysis_20231027.dta", clear

pwcorr Atrocities_Scope_and_Scale_Heuri e_gdp e_gdppc v2x_polyarchy e_polity2 ///
e_vanhanen v2x_neopat v2xnp_client v2x_accountability v2x_corr e_ti_cpi e_fh_rol ///
Prosperity_Index efindex e_peinfmor

pwcorr Mass_Containment_Index v2xcl_slave
pwcorr Mass_Conscription_Index v2xcl_slave
pwcorr Mass_Lesslethal_Violence_Index v2cltort v2x_clphy
pwcorr Mass_Murder_Index v2clkill tmk_ong CIRIGHTS_bbatrocity CIRIGHTS_bbatrocity_intensity
pwcorr Reduced_Citizenship_Index v2xcl_rol v2xeg_eqprotec
pwcorr Violence_Against_Women_Severity v2clslavef v2clacjstw v2clgencl ///
v2xpe_exlgender v2x_gencl v2pepwrgen
pwcorr Violence_Against_LGBTQI_Severity v2pepwrort
pwcorr Atrocities_Scope_and_Scale_Heuri pts_avg CIRIGHTS_human_rights_score
encode Country_UN_Subregion, gen(subregioncode)

reg Atrocities_Scope_and_Scale_Heuri Country_Total_Population v2x_neopat ///
 v2x_gender v2cacamps i.subregioncode i.Year, vce(hc3)

logistic Atrocities_Scope_and_Scale_Heuri Country_Total_Population v2x_neopat ///
v2x_gender v2cacamps i.subregioncode i.Year, or robust
coefplot, xline(0) drop(_cons) scheme(s1mono) xtitle(Log odds)


